<ui:composition xmlns="http://www.w3.org/1999/xhtml"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:c="http://java.sun.com/jstl/core"
     xmlns:fmt="http://java.sun.com/jstl/fmt"
     xmlns:x="http://java.sun.com/jstl/xml"
     xmlns:fn="http://java.sun.com/jstl/functions"
     xmlns:a4j="http://richfaces.org/a4j"
     xmlns:rich="http://richfaces.org/rich"
     xmlns:gape="http://componentes.gape/component/gape">
	<c:choose>
		<c:when test="${styleClass == null}">
			<a4j:commandLink action="#{navigation.navega}" value="#{value}" data="#{navigation.openError}" 
							 oncomplete="if(data){javascript:Richfaces.showModalPanel('panelError');}" reRender="panelError">
				<f:setPropertyActionListener value="#{mbean}" target="#{navigation.mbean}" />
				<f:setPropertyActionListener value="#{metodo}" target="#{navigation.metodo}" />
			</a4j:commandLink>			
		</c:when>
		<c:otherwise>
			<a4j:commandLink action="#{navigation.navega}" styleClass="#{styleClass}" value="#{value}" data="#{navigation.openError}" 
							 oncomplete="if(data){javascript:Richfaces.showModalPanel('panelError');}" reRender="panelError">
				<f:setPropertyActionListener value="#{mbean}" target="#{navigation.mbean}" />
				<f:setPropertyActionListener value="#{metodo}" target="#{navigation.metodo}" />
			</a4j:commandLink>			
		</c:otherwise>
	</c:choose>
</ui:composition>